/**
 * @file arm926_mem_prot.h
 *
 * @section descr File description
 *
 * Trampoline's memory protection for ARM926
 *
 * @note this code may be moved to generic ARM port
 *
 * @section copyright Copyright
 *
 * Trampoline OS
 *
 * Trampoline is copyright (c) IRCCyN 2005+
 * Copyright ESEO for function and data structures documentation and ARM port
 * Trampoline is protected by the French intellectual property law.
 *
 * This software is distributed under the Lesser GNU Public Licence
 *
 * @section infos File informations
 *
 * $Date: $
 * $Rev: $
 * $Author: $
 * $URL: $
 */
#ifndef ARM926_MEM_PROT_H
#define ARM926_MEM_PROT_H

#include "tpl_os_internal_types.h"
#include "tpl_os_definitions.h"
#include "tpl_os_mem_prot.h"

/**
 * This function prepares MMU data ѕtructures in memory
 * to reflect memory protection scheme generated by goil
 *
 * @note this does not starts the MMU
 */
extern FUNC(void, OS_CODE) tpl_init_mp();

/**
 * sets memory protection to privileged mode (no memory protection)
 */
extern FUNC(void, OS_CODE) tpl_mp_kernel_enter (void);

/**
 * turn back to memory protection configuration according to the running
 * process. If it is (or becomes) trusted, MMU is kept disabled (it should
 * already have been disabled at kernel enter
 */
extern FUNC(void, OS_CODE) tpl_mp_kernel_exit (void);

#endif /* ARM926_MEM_PROT_H */
